<%Const respagecode="complaints_merchant_search"%><% 'UTF-8%>
<%''加载通用函数和数据库连接%>
<!--#include file="../Include/Start.asp"-->
<%'检查是否登录%>
<!--#include file="../Include/checklogin.asp"-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<!--meta信息-->
	<!--#include file="../Include/meta.asp"-->
		
	<link rel="stylesheet" type="text/css"  href="../css/css-1.05.css"/>
	<link rel="stylesheet" type="text/css"  href="../css/console-1.03.css"/>
	<link rel="stylesheet" type="text/css"  href="../css/calendar.css"/>
	<link rel="stylesheet" type="text/css"  href="../css/console_home-1.06.css"/>
	<link rel="stylesheet" type="text/css"  href="../css/datepicker.css"/>
	
	<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
	<script type="text/javascript" src="../js/jquery.extend-1.06.js"></script>
	<script type="text/javascript" src="../js/common_1.01.js"></script>
	<script type="text/javascript" src="../js/menu.js"></script>
	<script type="text/javascript" src="../js/TrimPathTemplate.js"></script>
	<script type="text/javascript" src="../js/calendar/WdatePicker.js" ></script>
	<script type="text/javascript" src="../js/console_complaints_merchant.js"></script>
</head>

<body>
<div class="wrapper">

	<!--header页头信息-->
	<!--#include file="../Include/header.asp"-->
	<!--end header页头信息-->


	<!--navigation菜单信息-->
	<!--#include file="../Include/navigation.asp"-->
	<script type="text/javascript">
		/*选中该tab页 需要tab页上有ID*/
		$("#complaints").attr("className","on")
		$("#navigation").menu('point');
	</script>
	<!--end navigation菜单信息-->

<!--begin container-->
<div class="container" id="container">	

	<div class="c_left">
		<!--begin left_menu 左侧菜单信息-->
		<!--#include file="../Include/left_menu.asp"-->
		<!--end left_menu 左侧菜单信息-->	
	</div>
	<div class="c_right">
		<div class="c_r_head">
			<ul class="head_tab">
				<li class="on"><h4><a href="complaints_merchant.asp##div_tab_list">投诉单记录</a></h4></li>
			</ul>
		</div>
		<!--查询消费记录-->
		<div class="c_r_body" id="div_tab_list" name="div_tab_list">
			<form id="scform" action="complaints_merchant_do.asp" method="post" >
				<input id="page" name="page" type="hidden" value="1" />
				<div align="center" style="height:25px">
					查询投诉单记录
				</div>
				<table width="100%" border="0" cellpadding="0" cellspacing="2" style="margin:auto"> 
					<tr>
						<td align="right">申诉名称：</td><td>
							<input type="text" name="ssmc" id="ssmc" class="text" value="" style="width:90px" maxlength="50" />
						</td>
						<td align="right">申诉者姓名：</td><td>
							<input type="text" name="sszxm" id="sszxm" class="text" value="" style="width:90px" maxlength="50" />
						</td>
						<td align="right">品牌：</td><td>
							<input type="text" name="pp" id="pp" class="text" value="" style="width:90px" maxlength="50" />
						</td>
					</tr>
					<tr>
						<td height="30">&nbsp;</td>
						<td><input type="submit" value="查  询" />&nbsp;<label id="result_search"></label></td>
					</tr>
				</table>
			</form>
			<!--查询结果显示 begin-->
			<div id="div_rslist"></div><!--查询结果显示 end-->
		 	<!--Trimpath Templates begin-->		
			<div  style='display:none;'  >
				<textarea name="template_jst" id="template_jst"   >
					<!--将key和value值对应begin-->				
					{macro mapk2v(list, key)}
						{var mapk2v1=""}
						{if key== null}{var mapk2v1=""}{/if}
						{if list==null }{var mapk2v1=""}{/if}
						{for item in list}   
							{if key==item.key}{var mapk2v1=item.value}{/if}
						{/for}
						@{mapk2v1}
					{/macro}
				 	<!--将key和value值对应end-->				
					<!--显示记录列表 begin-->
					<table width="100%" border="0" cellpadding="2" cellspacing="0" class="list">
						<colgroup>
							<col width="30"/>		
							{var colume_list =['申诉者姓名','申诉者联系电话','被申诉方名称','申诉类别','申诉名称','品牌','型号','']}
							{var colume_list_1 =['','消费日期','争议金额','问题分类','申诉要求','受理时间','受理人','状态','操作']}
							{for colume_name in colume_list}
								<col/>
							{/for}
						</colgroup>
						<thead>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
							<tr class="bgblue">
								<th align="center"><input type="checkbox" onclick="checkboxAll('id_all',this)" name="checkboxAll"/></th>
								{for colume_name in colume_list}
									<th>@{colume_name}</th>
								{/for}
							</tr>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
							<tr class="bgblue">
								{for colume_name in colume_list_1}
									<th>@{colume_name}</th>
								{/for}
							</tr>
						</thead>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
						<tbody>
					{var flag_Num =1}
					{var tr_class ='bggreen'}
					{for p in rslist}
					     <tr class="@{tr_class}" onmouseover="$(this).addClass('on')" onmouseout="$(this).removeClass('on')">
					     	<td align="center"><input type="checkbox" value="@{p.id}" name="id_all" id="id_all"/></td>
					     	<td>@{p.申诉者姓名}</td>
					     	<td>@{p.申诉者联系电话}</td>
					     	<td>@{p.TrueName}</td>
					     	<td>@{p.申诉类别}</td>
					     	<td><a onclick="rs_el_View('@{p.id}')" href="javascript:void(0);">@{p.申诉名称}</a></td>
					     	<td>@{p.品牌}</td>
					     	<td>@{p.型号}</td>
					     	<td></td>
					     </tr>
					     <tr class="@{tr_class}" onmouseover="$(this).addClass('on')" onmouseout="$(this).removeClass('on')">
					     	<td></td>
					     	<td>@{p.消费日期}</td>
					     	<td>@{p.争议金额}</td>
					     	<td>@{p.问题分类}</td>
					     	<td>@{p.申诉要求}</td>
					     	<td>@{p.受理时间}</td>
					     	<td>@{p.build_user}</td>
					     	<td>@{mapk2v(complaints_type,p.状态)}</td>
					     	<td>
					     		{if '0'==p.状态 }
					     		<a onclick="rs_el_Edit('@{p.id}')" href="javascript:void(0);">修改</a>{/if}
					     		{if '0'==p.状态  || '1'==p.状态   || '2'==p.状态  || '3'==p.状态  }
					     		<a onclick="rs_el_View('@{p.id}')" href="javascript:void(0);">查看</a>{/if}
					     		{if '0'==p.状态 }
					     		<a onclick="rs_el_Delete('@{p.id}')" href="javascript:void(0);">删除</a>{/if}	
					     	</td>
					     </tr>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
					{if tr_class=='bggreen' }{var tr_class =''}{else}{var tr_class ='bggreen'}{/if}				
					{forelse}
					     <tr><td colspan="@{1+colume_list.length}">没有查询结果...</tr>
					{/for}
						</tbody>
						<tr class="line">
							<td colspan="@{1+colume_list.length}"><div></div></td>
						</tr>
					</table>
					<!--显示记录列表end-->
					<!--分页begin-->			
					{if page.PageSizeCur>0 }
					<table cellspacing="0" cellpadding="0" border="0" width="100%">
						<tbody>
							<tr>
								<td height="30">
									<div class="pages">
										{if page.PageCur>1}				
										<a title="第一页" class="first" onclick='loadRsList("1")' href="javascript:void(0);">1 ..</a>
										<a title="上一页" class="prev"  onclick='loadRsList("@{page.PageCur-1}")' href="javascript:void(0);">‹上一页</a>{/if}
										<strong>[@{page.PageCur}]</strong>
										{if page.PageCur<page.PageTotalNum}
										<a title="下一页" class="next"  onclick='loadRsList("@{page.PageCur-(-1)}")' href="javascript:void(0);">下一页›</a>
										<a title="最后一页" class="last" onclick='loadRsList("@{page.PageTotalNum}")' href="javascript:void(0);">@{page.PageTotalNum} ..</a>{/if}
										<em>共 @{page.PageTotalNum} 页</em>
									</div>
									
								</td>
							</tr>
						</tbody>
					</table>
					{/if}		
					<!--分页end-->
				
		</textarea>
	</div>
				
	<!--Trimpath Templates End-->			
			
			
			
		</div>

		<div class="c_r_body" id="div_tab_add" name="div_tab_add">
			<form action="complaints_merchant_do.asp" method="post" id="form_add">					
				<input id="cid" type="hidden" value="" />
				<div align="center" style="height:25px">
					添加记录
				</div>
				<table width="100%" border="0" cellpadding="2" cellspacing="4" style="margin:auto">
					<tr>
						<td align="right">申诉者姓名:</td>
						<td><input id="sszxm" name="sszxm" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">申诉者性别:</td>
						<td><input id="sszxb" name="sszxb" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">申诉者联系电话:</td>
						<td><input id="sszlxdh" name="sszlxdh" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">申诉者通信地址:</td>
						<td><input id="ssztxdz" name="ssztxdz" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">申诉者电子邮箱:</td>
						<td><input id="sszdzyx" name="sszdzyx" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right"></td>
						<td></td>
					</tr>
					<tr class="line">
                        <td colspan="4"><div/></td>
                    </tr>
					<tr>
						<td align="right">被申诉方:</td>
						<td><input id="bssfid" name="bssfid" value="fashioncat" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">申诉类别:</td>
						<td><input id="sslb" name="sslb" value="商品" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">申诉名称:</td>
						<td><input id="ssmc" name="ssmc" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">品牌:</td>
						<td><input id="pp" name="pp" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">型号:</td>
						<td><input id="xh" name="xh" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">价格:</td>
						<td><input id="jg" name="jg" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">凭证:</td>
						<td><input id="pz" name="pz" value="<%=GetRndPassword(10)%>" type="text" maxlength="50" class="text" style="width:100px"/></td>
						<td align="right">消费日期:</td>
						<td><input id="xfrq" name="xfrq" type="text" maxlength="10" value="<%=date()%>" onfocus="WdatePicker({el:this})" style="width: 90px;"  class="text Wdate" realvalue="2009-06-15"/></td>
					</tr>
					<tr>
						<td align="right">争议金额:</td>
						<td><input id="zyje" name="zyje" value="1212.1212" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">简述:</td>
						<td><input id="js" name="js" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					<tr>
						<td align="right">问题分类:</td>
						<td><input id="wtfl" name="wtfl" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">数量:</td>
						<td><input id="sl" name="sl" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					<tr class="line">
                        <td colspan="4"><div/></td>
                    </tr>
					<tr>
						<td align="right">申诉要求:</td>
						<td><input id="ssyq" name="ssyq" value="<%=GetRndPassword(10)%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
						<td align="right">受理人:</td>
						<td><input id="slr" name="slr" value="<%=Trim(Session("UserID"))%>" type="text" maxlength="30" class="text" style="width:100px"/></td>
					</tr>
					
					<tr class="line">
                        <td colspan="4"><div/></td>
                    </tr>
			
					
					<tr>
						<td align="right"> </td>
						<td><input name="" type="submit" value="添加" />&nbsp;<label id="result"></label></td>
					</tr>
				</table>
			</form>
		</div>
		
		<div class="c_r_body" id="div_tab_view" name="div_tab_view"></div>

		<div  style='display:none;'  >
				<textarea name="template_jst_view" id="template_jst_view"   >
			<!--将key和value值对应-->				
		 	{macro mapk2v(list, key)}
		 	 	{var mapk2v1=""}
		 	 	{if key== null}{var mapk2v1=""}{/if}
		 	 	{if list==null }{var mapk2v1=""}{/if}
			    {for item in list}   
			      {if key==item.key}{var mapk2v1=item.value}{/if}
			    {/for}
			    @{mapk2v1}
			{/macro}
  		 	{var p = rslist[0]}
 
			<div align="center" style="height:25px" >
				查看记录
			</div>
				<table width="100%" border="0" cellpadding="2" cellspacing="4" style="margin:auto">
						<tr class="line">
							<td colspan="4"><div></div></td>
						</tr>			
 		 
					<tr>
						<td align="right">申诉者姓名:</td>
						<td>@{p.申诉者姓名}</td>
						<td align="right">申诉者性别:</td>
						<td>@{p.申诉者性别}</td>
					</tr>
					<tr>
						<td align="right">申诉者联系电话:</td>
						<td>@{p.申诉者联系电话}</td>
						<td align="right">申诉者通信地址:</td>
						<td>@{p.申诉者通信地址}</td>
					</tr>
					<tr>
						<td align="right">申诉者电子邮箱:</td>
						<td>@{p.申诉者电子邮箱}</td>
						<td align="right"></td>
						<td></td>
					</tr>
					<tr class="line">
                        <td colspan="4"><div/></td>
                    </tr>
					<tr>
						<td align="right">被申诉方:</td>
						<td>@{p.TrueName}</td>
						<td align="right">处理结果:</td>
						<td>@{p.处理结果}</td>
					</tr>
					<tr class="line">
                        <td colspan="4"><div/></td>
                    </tr>
					<tr>
						<td align="right">申诉类别:</td>
						<td>@{p.申诉类别}</td>
						<td align="right"></td>
						<td></td>
					</tr>
					<tr>
						<td align="right">申诉名称:</td>
						<td>@{p.申诉名称}</td>
						<td align="right">品牌:</td>
						<td>@{p.品牌}</td>
					</tr>
					<tr>
						<td align="right">型号:</td>
						<td>@{p.型号}</td>
						<td align="right">价格:</td>
						<td>@{p.价格}</td>
					</tr>
					<tr>
						<td align="right">凭证:</td>
						<td>@{p.凭证}</td>
						<td align="right">消费日期:</td>
						<td>@{p.消费日期}</td>
					</tr>
					<tr>
						<td align="right">争议金额:</td>
						<td>@{p.争议金额}</td>
						<td align="right">简述:</td>
						<td>@{p.简述}</td>
					</tr>
					<tr>
						<td align="right">问题分类:</td>
						<td>@{p.问题分类}</td>
						<td align="right">数量:</td>
						<td>@{p.数量}</td>
					</tr>
					<tr class="line">
                        <td colspan="4"><div/></td>
                    </tr>
					<tr>
						<td align="right">状态</td>
						<td>@{mapk2v(complaints_type,p.状态)}</td>
						<td align="right">受理人:</td>
						<td>@{p.build_user}</td>
					</tr>
					<tr class="line">
                        <td colspan="4"><div/></td>
                    </tr>
			</table>
					
				<table width="100%" border="0" cellpadding="2" cellspacing="4" style="margin:auto">
					<tr>
						<td width="50%" valign="top" align="center">	
							<table>
								<tbody>
									<tr>
										<td colspan="2" align="center"><input type="button" value="返 回" id="viewback" name="viewback"/></td>
									</tr>
									<tr><br></tr>
									<tr>
										<td align="right">申诉要求：</td>
										<td>
											@{p.申诉要求}
										</td>										
									</tr>
								</tbody>
							</table>
						</td>
						<td style="border-width: 0pt 0pt 0pt 1px;" class="border"> </td> 
						<td width="50%" valign="top">
			<form action="complaints_merchant_do.asp" method="post" id="form_view">						
							<input id="act" name="act" type="hidden" value="apply" />
							<input id="cid" name="cid" type="hidden" value="@{p.id}" />
							<input id="state" name="state" type="hidden" value="@{p.状态}" />
							<table>
								<tbody>
									<tr>
										<td align="center"></td>										
										<td>
											{if 1==p.状态}<input type="submit" value="商家提交处理结果" name="" />{/if}
											&nbsp;<label id="result_view"></label>
										</td>
									</tr>
									<tr><br></tr>
									<tr>
										<td align="right">处理结果：</td>
										<td>
										{if 3==p.状态}@{p.处理结果}{/if}
										{if 1==p.状态  || '2'==p.状态  }
											<input type="text" name="cljg" id="cljg" class="text" value="@{p.处理结果}"  {if 2==p.状态 }readonly=true{/if} style="width:220px" maxlength="500" />
										{/if}
										</td>
									</tr>
								</tbody>
							</table>
			</form>
						</td>
					</tr>

				</table>
	 
			</textarea>
	</div>
 
 
	</div>

	<script type="text/javascript">		
		initPage();	
		$('#scform').submit();
	</script>
	
 
 
</div>



	
	
</div>
<!--footer页脚信息-->
<!--#include file="../Include/footer.asp"-->
<!--end footer页脚信息-->
</div>
</body>
</html>
